package chatserver.logging;

import chatserver.main.ServerMain;
import java.util.logging.LogRecord;
import java.util.logging.Handler;

public class GuiHandler extends Handler {

    @Override
    public boolean isLoggable(LogRecord record) {
        return true;
    }

    @Override
    public void publish(LogRecord record) {
        ServerMain.addLog(getFormatter().format(record));
    }

    @Override
    public void flush() {
    }

    @Override
    public void close() throws SecurityException {
    }
}
